/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-06-04
 * Time: 19:38
 */
public class Test {

    public static void main(String[] args) {
        /**
         * 装箱
         */
        int a = 2;
        a = Integer.valueOf(a);//手动 or 显示装箱

        Integer b = 1;//(自动)隐式装箱，实则调用了Integer.valueOf方法
        System.out.println(a);
        System.out.println(b);




//        Integer c = 10;
        /**
         * 拆箱
         */
      /*int a = c.intValue(); //手动拆箱
      System.out.println(a);


      int d = c;
        System.out.println(d);//自动拆箱*/
    }
}
